<template>
	<view class="my-search-container" :style="{'background-color':bgColor}" @click="gotoSearh">
		<view class="my-search-box" :style="{'border-radius':radius+'px'}"> 
			<uni-icons class="search-icon" type="search" size="25"></uni-icons>
			<view class="placeholder">搜索</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		props:{
			//背景颜色
			bgColor:{
				type: String,
				default:'#C00000'
			},
			//圆角尺寸
			radius:{
				type: Number,
				default: 18 
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			gotoSearh(){
				this.$emit('myClick')
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container{
		height: 50px;
		// background-color: #B10004;
		padding: 0px 10px;
		display: flex;
		align-items: center;
		text-align: center;
		.my-search-box{
			width: 100%;
			background: #fff;
			height: 36px;
			// border-radius: 18px;
			align-items: center;
			display: flex;
			justify-content: center;
			.placeholder{
				font-size: 15px;
				margin-left: 5px;
				// vertical-align: center;
			}
		}
	}
</style>
